package springsecurityrabclogin.entity;

import lombok.Data;

import java.io.Serializable;

/**
 * 权限表，用于存储系统中各类权限的相关信息
 * t_permission
 */
//@Data
public class TPermission implements Serializable {
    /**
     * 主键，自增ID，唯一标识每条权限记录
     */
    private Integer id;

    /**
     * 权限名称，用于直观表示权限的功能或模块
     */
    private String name;

    /**
     * 权限编码，用于程序中精确标识和控制权限
     */
    private String code;

    /**
     * 权限对应的链接，若为菜单权限，通常关联到具体页面路径
     */
    private String url;

    /**
     * 权限类型，取值如'menu'表示菜单，'button'表示按钮等操作权限
     */
    private String type;

    /**
     * 父级权限ID，用于构建权限层级关系，0表示顶级权限
     */
    private Integer parentId;

    /**
     * 权限排序号，数值越小越优先显示，用于确定权限展示顺序
     */
    private Integer orderNo;

    /**
     * 菜单图标，若为菜单权限，用于在前端展示对应的图标
     */
    private String icon;

    /**
     * 菜单对应要渲染的Vue组件名称，若为菜单权限，指定前端渲染的具体组件
     */
    private String component;

    public TPermission() {
    }

    public TPermission(Integer id, String name, String code, String url, String type, Integer parentId, Integer orderNo, String icon, String component) {
        this.id = id;
        this.name = name;
        this.code = code;
        this.url = url;
        this.type = type;
        this.parentId = parentId;
        this.orderNo = orderNo;
        this.icon = icon;
        this.component = component;
    }

    /**
     * 获取
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return code
     */
    public String getCode() {
        return code;
    }

    /**
     * 设置
     * @param code
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * 获取
     * @return url
     */
    public String getUrl() {
        return url;
    }

    /**
     * 设置
     * @param url
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * 获取
     * @return type
     */
    public String getType() {
        return type;
    }

    /**
     * 设置
     * @param type
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * 获取
     * @return parentId
     */
    public Integer getParentId() {
        return parentId;
    }

    /**
     * 设置
     * @param parentId
     */
    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    /**
     * 获取
     * @return orderNo
     */
    public Integer getOrderNo() {
        return orderNo;
    }

    /**
     * 设置
     * @param orderNo
     */
    public void setOrderNo(Integer orderNo) {
        this.orderNo = orderNo;
    }

    /**
     * 获取
     * @return icon
     */
    public String getIcon() {
        return icon;
    }

    /**
     * 设置
     * @param icon
     */
    public void setIcon(String icon) {
        this.icon = icon;
    }

    /**
     * 获取
     * @return component
     */
    public String getComponent() {
        return component;
    }

    /**
     * 设置
     * @param component
     */
    public void setComponent(String component) {
        this.component = component;
    }

    public String toString() {
        return "TPermission{id = " + id + ", name = " + name + ", code = " + code + ", url = " + url + ", type = " + type + ", parentId = " + parentId + ", orderNo = " + orderNo + ", icon = " + icon + ", component = " + component + "}";
    }


    private static final long serialVersionUID = 1L;

}